$(document).ready(function() {
	$(parent.document).find("iframe").each(function() {
	    // apply the logic only to the current iframe only
	    if(this.contentDocument == window.document) {
	       // if the href of the iframe is not same as 
	       // the value of src attribute then reload it
	      if(this.src != location.href) {
	        this.src = this.src;
	      }
	    }
	});

	$(document).bind('keydown', 'ctrl+s', function(evt){
		$('body').find('form').submit();
         return false;
	});
	$('.errors').each(function(){
		var panelid=$(this).closest('.ui-tabs-panel').attr('id');
		$('a[href=#'+panelid+']').trigger('click').closest('.ui-tabs-nav-item').addClass('ui-state-error');
	});

	
});

